package com.student.bean;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

public class User implements Serializable {
    private Integer userid;

    private String nickname;

    private String loginname;

    private String loginpassword;

    private String salt;

    private String signature;

    private String sex;

    private Integer age;

    private String phonenumber;

    private String area;

    private Integer constellationid;

    private Date birthday;

    private String email;

    //时间格式化注解
    @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
    private Date registertime;

    @Override
    public String toString() {
        return "User{" +
                "userid=" + userid +
                ", nickname='" + nickname + '\'' +
                ", loginname='" + loginname + '\'' +
                ", loginpassword='" + loginpassword + '\'' +
                ", salt='" + salt + '\'' +
                ", signature='" + signature + '\'' +
                ", sex='" + sex + '\'' +
                ", age=" + age +
                ", phonenumber='" + phonenumber + '\'' +
                ", area='" + area + '\'' +
                ", constellationid=" + constellationid +
                ", birthday=" + birthday +
                ", email='" + email + '\'' +
                ", registertime=" + registertime +
                '}';
    }

    public Integer getUserid() {
        return userid;
    }

    public void setUserId(Integer userid) {
        this.userid = userid;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname == null ? null : nickname.trim();
    }

    public String getLoginname() {
        return loginname;
    }

    public void setLoginname(String loginname) {
        this.loginname = loginname == null ? null : loginname.trim();
    }

    public String getLoginpassword() {
        return loginpassword;
    }

    public void setLoginpassword(String loginpassword) {
        this.loginpassword = loginpassword == null ? null : loginpassword.trim();
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt == null ? null : salt.trim();
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature == null ? null : signature.trim();
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex == null ? null : sex.trim();
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getPhonenumber() {
        return phonenumber;
    }

    public void setPhonenumber(String phonenumber) {
        this.phonenumber = phonenumber == null ? null : phonenumber.trim();
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area == null ? null : area.trim();
    }

    public Integer getConstellationid() {
        return constellationid;
    }

    public void setConstellationid(Integer constellationid) {
        this.constellationid = constellationid;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email == null ? null : email.trim();
    }

    public Date getRegistertime() {
        return registertime;
    }

    public void setRegistertime(Date registertime) {
        this.registertime = registertime;
    }
}